home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / hamming.ins < prev    next >
Text File  |  1993-08-23  |  3KB  |  109 lines

  1. inst4.1        !01-Jun-89  (hamming.ins) Hamming Network Builder
  2. !****************************************************************
  3. !*                                *
  4. !*    Hamming Network Generator                * 
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input / output PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckOut
  12. @Err    "Hamming Network MUST have at least one input PE"
  13. :CheckOut
  14. ?&Out    1
  15. >bge    OutOK
  16. @Err    "Hamming Network MUST have at least one output PE"
  17. :OutOK
  18.  
  19. !    *** Load the Control Strategy and LRS if needed
  20.  
  21. @LdCS    "hamming"        !control strategy
  22. @LdLR    "hamming"        !L/R schedule
  23.  
  24. =netn    "InstaNet (tm) Hamming Network version 1.00 01-Jun-89"
  25. =DLnF    0            !learn  re-display off
  26. =DRcF    0            !recall re-display off
  27.  
  28. !    *** Build the Input Layer ***
  29.  
  30. @LLdf                !load default layer to mi_layer structure
  31. =LDln    "In"            !layer name
  32. =Lpes    &In            !copy # of input PEs from menu
  33. =Ltrn    "Signum"        ! input -1's and 1's
  34. =x    100            !place to put layer on screen
  35. =y    60
  36. #Incl    "stdnwgtf.iif"        !standard # weight fields
  37. @LAdd                !add the input layer
  38.  
  39. !    *** Build the Category layer ***
  40.  
  41. @LLdf                !start with default layer again
  42. =LDln    "Category"        !layer name
  43. =Lpes    &Out            !copy # of output PEs from menu
  44. =Lcmp    "One-Highest"        !competitive output
  45. =Llrn    "Widrow-Hoff"        !really Hebbian
  46. =LInL    0.0            !low initialization limit
  47. =LInH    0.0            !high initialization limit
  48. +y    100            !up higher on display
  49. #Incl    "stdnwgtf.iif"        !standard # weight fields
  50. @LAdd
  51.  
  52. !    *** Connect Category Layer to Input Layer and bias ***
  53.  
  54. =SPEl    LayN            !current layer
  55. @SlPE                !select it as destination
  56. =NPEl    0            !input layer
  57. @NrPE
  58. =cnwt    0.0            !connection weight
  59. =cnty    WVar            !variable weights
  60. =cnsc    WAbs            !absolute
  61. @LCFl                !fully connect to input layer
  62. =NPEl    -1            ! bias
  63. @NrPE
  64. =cnwt    &In            ! Start calculating bias weights
  65. /cnwt    2.0
  66. =cnty    WFix            !fixed weights
  67. @LCFl                !fully connect to bias
  68. =n0    LayN            !save current layer for later
  69.  
  70. !    *** Build the output layer ***
  71.  
  72. @LLdf                !start with default layer again
  73. =LDln    "Output"        !layer name
  74. =Lpes    &Out            !copy # of output PEs from menu
  75. =Ltrn    "StepFunction"        ! Output 0's and 1's
  76. =Llrn    "--None--"        !no learning
  77. +y    100            !up higher on display
  78. #Incl    "stdnwgtf.iif"        !standard # weight fields
  79. @LAdd
  80.  
  81. !    *** Connect Category layer to output layer ***
  82.  
  83. =SPEl    LayN            !current layer
  84. @SlPE                !select it as destination
  85. =NPEl    n0            !category layer
  86. @NrPE
  87. =cnty    WFix            !fixed weights
  88. =cnwt    1.0            !connection weight
  89. @LCCr                !correspondingly connect
  90.  
  91. !    *** Select Control Strategy & L/R Schedule ***
  92.  
  93. @LLsl                !load super layer
  94. =Lctl    "hamming"        !control strategy
  95. =Llrs    "hamming"        !L/R Schedule
  96. =Llnn    "hamming"        !name of learn input
  97. =Lrcn    "hamming"        !name of recall output
  98. =Lscl    -1            !input  low-value
  99. =Loff     1            !input  high-value
  100. =Llow     0            !output low-value
  101. =Lhgh     1            !output high-value
  102. =Lax1    Epch            !epoch size
  103. @SVsl                !save it back
  104. !
  105. !=Grph     1
  106. !=GrLF    "hamming"        !instrument list file
  107. !
  108. @EOF
  109.